{extend name="layout"}
{block name="body"}
    <section class="wld-content">
        <div class="page_title">社保服务</div>
        <div class="page_title_obj">
        	{if $contract_type eq 1}
			<a style="padding-right: 14px; color: #61cad7;" href="{:url('index/socsecs/services')}"><i style="padding-right: 5px; font-size: 15px; color: #61cad7;" class="iconfont iconmingxi"></i>社保服务收费明细</a>
			{/if}
            <div class="title-seach">
				
				<div class="title-seach-tag con_tag_title">
					<span>
						<em>
							{if empty($Think.get.status) ||  $Think.get.status eq 0}
							全部
							{elseif $Think.get.status eq 1}
							办理中
							{elseif $Think.get.status eq 2}
							已办理
							{elseif $Think.get.status eq 3}
							无法办理
							{/if}
						</em> 
						<i class="iconfont iconxiangxia"></i>
					</span>
					<ul class="con_tag_con ">
						<li data-val="0">全部</li>
						<li data-val="1">办理中</li>
						<li data-val="2">已办理</li>
						<li data-val="3">无法办理</li>
					</ul>
				</div>
				<input type="hidden" value="{$Think.get.type}" name="type" >
                <input type="hidden" value="{$Think.get.status}" name="status" class="seachType">
                <input type="text" name="search" value="{$Think.get.search}"  lay-verify="required" placeholder="搜索" class="wld-input-bg">
				<i class="iconfont iconfangdajing" ></i>
			</div>
        </div>
        <div class="con_box layui-form">
			<div class="con_tag">
				<a href="{:url('index/socsecs/index')}" {if empty($Think.get.type) ||  $Think.get.type eq 1} class="on" {/if}>公司服务</a>
				<a href="{:url('index/socsecs/index')}?type=2" {if $Think.get.type eq 2} class="on" {/if}>员工服务</a>
                <div class="tag_right">
                	{if empty($Think.get.type) ||  $Think.get.type eq 1}
                    <span class="tag_right_exp" data-export-table data-export-url='{:url('index/socsecs/export_company')}'>导出所选项</span>
                    {/if}
                    {if $Think.get.type eq 2}
                    <span class="tag_right_exp" data-export-table data-export-url='{:url('index/socsecs/export_person')}'>导出所选项</span>
                    {/if}
                </div>
			</div>
			<div class="con_table">
				{if empty($Think.get.type) ||  $Think.get.type eq 1}
				<table  class="layui-table table-all" lay-skin="nob" data-export-name="table">
					{notempty name='list'}
                    <colgroup>
                        <col width="80">
                        <col width="282">
						<col width="354">
						<col width="164">
						<col width="122">
						
					  </colgroup>
					  <thead>
						<tr>
                            <th><input type="checkbox" lay-filter="allChoose" name="" title="" lay-skin="primary"></th>
                            <th>服务编号</th>
							<th>服务名称</th>
						    <th>委托日期</th>
                            <th>状态</th>
                        
						</tr> 
					  </thead>
					  {/notempty}
					  <tbody>
					  	{foreach $list as $key=>$vo}
						<tr>
                          <td><input type="checkbox" lay-filter="tdChoose" name="" title="" value="{$vo.id|default='0'}" lay-skin="primary"></td>
                          <td>{$vo.code|default=''}</td>
						  <td>{$vo.title|default=''}</td>
                          <td>{$vo.create_at|date='Y-m-d'}</td>
                          <td>
                          	{if $vo.status eq 1}<span class="color-green">办理中</span>
	                        {elseif $vo.status eq 2}<span class="color-green">办理中</span>
	                        {elseif $vo.status eq 3}<span class="color-desc">已办理</span>
	                        {elseif $vo.status eq 4}<span class="color-red">无法办理</span>
	                        {/if}
                          </td>
						</tr>
						{/foreach}
						                        
                     </tbody>
				</table>
				{empty name='list'}
	            <div class="con_blank">
	                <img src="__ROOT__/static/index/img/con_blank_img.png">
	                <p class="con_blank_title">暂无数据</p>
	            </div>
	            {else}{$list|raw|default=''}{/empty}
				{/if}
				{if $Think.get.type eq 2}
				<table  class="layui-table table-all" lay-skin="nob" data-export-name="table">
					{notempty name='list'}
                    <colgroup>
                        <col width="80">
                        <col width="236">
                        <col width="88">
						<col width="192">
						<col width="226">
						<col width="123">
						<col width="102">
					  </colgroup>
					  <thead>
						<tr>
                            <th><input type="checkbox" lay-filter="allChoose" name="" title="" lay-skin="primary"></th>
                            <th>服务编号</th>
						    <th>姓名</th>
						    <th>身份证号</th>
							<th>服务名称</th>
							<th>委托日期</th>
							<th>状态</th>
						</tr> 
					  </thead>
					  {/notempty}
					  <tbody>
					  	{foreach $list as $key=>$vo}
						<tr>
                          <td><input type="checkbox" name=" " lay-filter="tdChoose" value="{$vo.id|default='0'}" title="" lay-skin="primary"></td>
                          <td>{$vo.code|default=''}</td>						  
						  <td>{$vo.name|default=''}</td>
						  <td>{$vo.id_number|default=''}</td>
						  <td>{$vo.title|default=''}</td>
                          <td>{$vo.create_at|date='Y-m-d'}</td>
                          <td>
                          	{if $vo.status eq 1}<span class="color-red">办理中</span>
	                        {elseif $vo.status eq 2}<span class="color-red">办理中</span>
	                        {elseif $vo.status eq 3}<span class="color-red">已办理</span>
	                        {elseif $vo.status eq 4}<span class="color-red">无法办理</span>
	                        {/if}
                          </td>
                          
						</tr>
						{/foreach}
					
                     </tbody>                    	
                </table>
                		{empty name='list'}
			            <div class="con_blank">
			                <img src="__ROOT__/static/index/img/con_blank_img.png">
			                <p class="con_blank_title">暂无数据</p>
			                <!-- <p class="con_blank_con">暂无数据，请手动添加</p> -->
			            </div>
			            {else}{$list|raw|default=''}{/empty}
                {/if}
                
            </div>

		</div>
    </section>
{/block}
{block name='script'}
<script>
 $(document).ready(function(){
	$(".con_tag_con").on("click","li",function(){
		var name=$(this).text();
		$('.con_tag_title span em').text(name);
	
		$(".seachType").val($(this).data("val"))
		$(".con_tag_con").removeClass('bounceInRight').addClass('bounceOutRight')
		$(".title-seach i").click();
		// setTimeout(function(){$(".con_tag_con").hide() }, 500);
	})
 })
</script>
{/block}

